﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;

namespace DAL
{
    public class PropertiesHelper
    {
        public object GetProperty(Type T, string PropertyName)
        {
            try
            {
                object o = (from props in T.GetProperties()
                            where props.Name.ToUpper() == PropertyName.ToUpper()
                            select props).Single();

                return o;
            }
            catch(Exception ex)
            {
                throw new Exception("PropertiesHelper - GetProperty - ", ex);

            }
        }
    }
}
